<?php
/**
 * Created by PhpStorm.
 * User: Ysll <754060604@qq.com>
 * Date: 2017/9/29
 * Time: 16:57
 */

namespace Common\Common;

class ResponseResult
{
    public static function error($code, $data) {
        die(json_encode(['success' => false, 'code' => $code, 'data' => $data]));
    }

    public static function success($data) {
        die(json_encode(['success' => true, 'code' => 0, 'data' => $data]));
    }
}